/*!
\file
	ItemBase.h
\brief
	ItemBase - base class for each class in OOP Model hierarchy.
\details
\bug
	none
\todo
	none
\date
	January 27, 2008 - first version of the file.
	April 20, 2008 - added method generate_description_by_name().
\author
	Copyright (C) 2010 Vadym Hulakov, mailto:hulakov@gmail.com.
	All rights reserved.
*/

#ifndef ItemBase_H
#define ItemBase_H

#include <string>

namespace ObjectModel
{
	//! Base class for all other classes in OOP Model hierarchy.
	class ItemBase
	{
	public:
		//! @name Construction and destruction

		//@{
		//! Constructor.
		//! @param [in] name
		//!		Name of an object.
		//! @param [in] description
		//!		Description of an object.
		ItemBase(const wchar_t* name, const wchar_t* description = 0);

		//! Copy constructor.
		//! @param [in] object
		//!		The object to be copied.
		ItemBase(const ItemBase& object);

		//! Destructor
		~ItemBase();

		//! Assignment operator.
		//! @param [in] object
		//!		The object to be assigned to the current ItemBase.
		virtual ItemBase& operator=(const ItemBase& object);

	private:
		void construct(const ItemBase& object);

	public:
		//@}

		//! @name Properties
		//@{
		//! Get name of an object.
		//! @return
		//!		Name of an object.
		virtual const std::wstring& getName() const { return _name; }

		//! Get description of the object.
		//! @return
		//!		Description of object.
		virtual const std::wstring& getDescription() const { return _description; }

		//@}

	private:
		//! Name of a object.
		std::wstring _name;

		//! Description of the object.
		std::wstring _description;
	};
}

#endif // ItemBase_H